package service

import (
	"sync"
	"todo-list/repository/db/model"
	"todo-list/types"
)

var (
	CommonSrvIns  *CommonSrv
	CommonSrvOnce sync.Once
)

type CommonSrv struct {
}

func (c *CommonSrv) ListTaskStatus() *types.DataList {
	statusList := types.DataList{model.NotStart, model.Abandon, model.Doing, model.Done}
	return &statusList
}

func GetCommonSrv() *CommonSrv {
	CommonSrvOnce.Do(func() {
		CommonSrvIns = &CommonSrv{}
	})
	return CommonSrvIns
}
